#include <stdio.h>

int sum(int array[], int length);

int main() {
	int A[] = {2, 3, 5, 7, 9, 10, 23, 29, 30, 49};
	int length = sizeof(A) / sizeof(A[0]);

	printf("sum = %d", sum(A, length));
}

int sum(int array[], int length) {
	int sum = 0;
	for (int i = 0; i < length; i++) {
		sum += array[i];
	}
	return sum;
}